﻿<Page x:Class="WpfAnimation.PageCustomAnimation"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:local="clr-namespace:WpfAnimation"
      mc:Ignorable="d" 
      d:DesignHeight="350" d:DesignWidth="880"
	Title="PageCustomAnimation">
    <Grid>
        <Button Content="Button" Height="44" HorizontalAlignment="Left" Margin="10,112,0,0" Name="button1" VerticalAlignment="Top"
                Width="100" >
            <Button.Triggers>
                <EventTrigger RoutedEvent="Button.Click">
                    <BeginStoryboard>
                        <Storyboard  >
                            <local:TestAnimation From="100" To="500"  
                                                 Duration="00:00:5" AccelerationRatio=".2" DecelerationRatio=".8" 
                                                 Storyboard.TargetName="button1" Storyboard.TargetProperty="Width"  />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Button.Triggers>
        </Button>
   
    </Grid>
</Page>
